<?php
/**
 * Created by PhpStorm.
 * User: GuoHengxi
 * Date: 13-11-25
 * Time: 下午11:40
 */

//判断目录是否为空

function is_empty_dir($fp)
{
    $H = @opendir($fp);
    $i=0;
    while($_file=readdir($H)){
        $i++;
    }
    closedir($H);
    if($i>2){
        return false;
    }else{
        return true;  //true
    }
}